Skip to content

1570#5325

Merged
ivicac merged 22 commits into
masterfrom
1570
Jul 3, 2026
Merged

1570#5325
ivicac merged 22 commits into
masterfrom
1570

Conversation

@ivicac

@ivicac ivicac commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands ByteChef’s workflow and Copilot AI capabilities by (1) allowing multi-trigger workflows, (2) making workflow validation “config-aware” for dynamic outputs, and (3) centralizing AI provider/model/key resolution while adding Ollama embedding support and improving Copilot tool execution context.

Changes:

  • Allow workflows to contain multiple triggers and update agent prompts/instructions accordingly.
  • Add config-aware per-node output validation so output references can hard-fail when a dynamic schema (resolved from configured inputs) does not expose a referenced property.
  • Introduce/extend AI provider + Copilot infrastructure: Ollama embedding support, unified provider enum usage, API-key/model resolution APIs, tool-context rehydration, and a connection-listing SPI that supports embedded chat.

Reviewed changes

Copilot reviewed 74 out of 74 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
server/libs/platform/platform-workflow/platform-workflow-validator/platform-workflow-validator-service/src/test/java/com/bytechef/platform/workflow/validator/WorkflowValidatorTest.java Updates trigger-structure test to reflect multi-trigger support.
server/libs/platform/platform-workflow/platform-workflow-validator/platform-workflow-validator-service/src/test/java/com/bytechef/platform/workflow/validator/WorkflowValidatorConfigAwareOutputTest.java Adds tests for config-aware dynamic output reference validation.
server/libs/platform/platform-workflow/platform-workflow-validator/platform-workflow-validator-service/src/main/java/com/bytechef/platform/workflow/validator/WorkflowValidatorFacadeImpl.java Builds per-node dynamic output map (best-effort) and passes it into validation.
server/libs/platform/platform-workflow/platform-workflow-validator/platform-workflow-validator-service/src/main/java/com/bytechef/platform/workflow/validator/WorkflowValidator.java Adds overloads to accept nodeOutputMap; removes single-trigger restriction; validates each trigger object.
server/libs/platform/platform-workflow/platform-workflow-validator/platform-workflow-validator-service/src/main/java/com/bytechef/platform/workflow/validator/ValidationContext.java Carries nodeOutputMap through validation context.
server/libs/platform/platform-workflow/platform-workflow-validator/platform-workflow-validator-service/src/main/java/com/bytechef/platform/workflow/validator/DataPillValidator.java Uses nodeOutputMap (when present) to validate property existence/type against config-resolved outputs.
server/libs/platform/platform-ai/platform-ai-tool/src/main/resources/instruction_workflow_build.txt Updates instruction to allow one or more triggers.
server/libs/platform/platform-ai/platform-ai-api/src/main/java/com/bytechef/platform/ai/llm/Provider.java Moves Provider to platform AI package; expands embedding providers; adds key lookup helper.
server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/util/AiTextUtils.java Migrates provider enum imports to platform package.
server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/constant/AiTextConstants.java Migrates provider enum imports to platform package.
server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/action/definition/AiTextActionDefinition.java Migrates provider enum imports to platform package.
server/libs/modules/components/ai/universal/universal-image/src/main/java/com/bytechef/component/ai/universal/image/util/AiImageUtils.java Migrates provider enum imports to platform package.
server/libs/modules/components/ai/universal/universal-image/src/main/java/com/bytechef/component/ai/universal/image/constant/AiImageConstants.java Migrates provider enum imports to platform package.
server/libs/modules/components/ai/universal/universal-image/src/main/java/com/bytechef/component/ai/universal/image/action/GenerateImageAction.java Migrates provider enum imports to platform package.
server/libs/modules/components/ai/universal/universal-image/src/main/java/com/bytechef/component/ai/universal/image/action/definition/AiImageActionDefinition.java Migrates provider enum imports to platform package.
server/libs/modules/components/ai/llm/ollama/src/test/resources/definition/ollama_v1.json Adds an embedding cluster element definition to the Ollama component JSON.
server/libs/modules/components/ai/llm/ollama/src/main/java/com/bytechef/component/ai/llm/ollama/OllamaComponentHandler.java Registers new OllamaEmbedding cluster element.
server/libs/modules/components/ai/llm/ollama/src/main/java/com/bytechef/component/ai/llm/ollama/constant/OllamaConstants.java Adds embedding-model property and embedding-model filtering helper.
server/libs/modules/components/ai/llm/ollama/src/main/java/com/bytechef/component/ai/llm/ollama/cluster/OllamaEmbedding.java Introduces an embedding cluster element backed by Spring AI’s OllamaEmbeddingModel.
server/libs/modules/components/ai/llm/build.gradle.kts Adjusts dependency exposure (platform-ai-api as api).
server/libs/config/app-config/src/main/java/com/bytechef/config/ApplicationProperties.java Adds Copilot docs embedding configuration and Ollama embedding model config.
server/libs/config/ai-model-config/src/main/java/com/bytechef/ai/model/config/AiModelConfiguration.java Adds CE Ollama EmbeddingModel bean; refactors config; CE-conditional configuration.
server/libs/config/ai-model-config/build.gradle.kts Adds Spring AI Ollama + platform-api dependency.
server/ee/libs/platform/platform-configuration/platform-configuration-service/src/test/java/com/bytechef/ee/platform/configuration/facade/AiProviderFacadeTest.java Updates embedding provider expectations to match Provider.EMBEDDING_PROVIDERS.
server/ee/libs/platform/platform-configuration/platform-configuration-service/src/test/java/com/bytechef/ee/platform/configuration/facade/AiProviderFacadeProvidersTest.java Migrates provider enum import to platform package.
server/ee/libs/platform/platform-configuration/platform-configuration-service/src/test/java/com/bytechef/ee/platform/configuration/facade/AiProviderFacadeDefaultModelTest.java Adds tests for embedding default-model + API key resolution and chat model key resolution.
server/ee/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/ee/platform/configuration/facade/AiProviderFacadeImpl.java Adds embedding default model and API-key resolution APIs; uses Provider.valueOfKey.
server/ee/libs/platform/platform-configuration/platform-configuration-api/src/main/java/com/bytechef/ee/platform/configuration/facade/AiProviderFacade.java Extends facade API for default model + API key retrieval.
server/ee/libs/platform/platform-configuration/platform-configuration-api/src/main/java/com/bytechef/ee/platform/configuration/dto/AiDefaultModelWithApiKeyDTO.java Adds DTO carrying provider+model+apiKey.
server/ee/libs/platform/platform-configuration/platform-configuration-api/build.gradle.kts Adds platform-ai-api dependency.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/test/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogEmbeddingProviderStatusProviderTest.java Switches embedding-active checks to default embedding model resolution via facade.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/test/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogEmbeddingModelTest.java Updates embedding model tests to use default model+key DTO via facade.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/test/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogEmbeddingModelFactoryTest.java Migrates provider enum import to platform package.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/test/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogChatModelTest.java Adds tests for default chat provider resolution and caching behavior.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/test/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogChatModelFactoryTest.java Migrates provider enum import to platform package.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/test/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogChatClientResolverTest.java Updates chat client resolver tests to use facade getApiKey API.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/main/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogEmbeddingProviderStatusProvider.java Determines embedding activity via resolved default embedding model+key.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/main/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogEmbeddingModelFactory.java Adds Ollama embedding factory mapping.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/main/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogEmbeddingModel.java Resolves embedding delegate from facade-provided default model+key and caches by env/provider/model/key.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/main/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogChatModelFactory.java Adds Ollama chat factory mapping and reorders provider mapping.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/main/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogChatModel.java Introduces always-present ChatModel resolving default provider+key at call time.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/src/main/java/com/bytechef/ee/platform/ai/agent/catalog/CatalogChatClientResolverImpl.java Resolves per-provider chat client using facade API-key lookup.
server/ee/libs/platform/platform-ai/platform-ai-agent/platform-ai-agent-service/build.gradle.kts Adds Ollama component + EE platform-configuration-api dependency.
server/ee/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/ee/embedded/configuration/facade/EmbeddedCopilotConnectionLister.java Adds embedded-surface implementation of connection listing SPI.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/test/java/com/bytechef/ee/ai/copilot/tool/RehydrateContextToolCallbackTest.java Adds EnvironmentContext binding assertions for tool execution threads.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/test/java/com/bytechef/ee/ai/copilot/tool/ListConnectionsForComponentToolCallbackTest.java Updates tests for SPI-based connection listing, fuzzy slug resolution, and error semantics.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/main/java/com/bytechef/ee/ai/copilot/tool/WorkspaceCopilotConnectionLister.java Adds workspace-surface implementation of connection listing SPI.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/main/java/com/bytechef/ee/ai/copilot/tool/SelectTriggerPropertyOptionToolCallback.java Allows embedded use by requiring only invocation context, not workspace ID.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/main/java/com/bytechef/ee/ai/copilot/tool/SelectPropertyOptionToolCallback.java Allows embedded use by requiring only invocation context, not workspace ID.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/main/java/com/bytechef/ee/ai/copilot/tool/RehydrateContextToolCallback.java Rehydrates EnvironmentContext in addition to tenant/security contexts.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/main/java/com/bytechef/ee/ai/copilot/tool/LookupTriggerPropertyOptionsToolCallback.java Allows embedded use by requiring only invocation context, not workspace ID.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/main/java/com/bytechef/ee/ai/copilot/tool/LookupActionPropertyOptionsToolCallback.java Allows embedded use by requiring only invocation context, not workspace ID.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/src/main/java/com/bytechef/ee/ai/copilot/tool/ListConnectionsForComponentToolCallback.java Refactors to SPI-based listing; adds fuzzy slug auto-resolution; refines error handling.
server/ee/libs/ai/ai-copilot/ai-copilot-tool/build.gradle.kts Adds platform-configuration-api dependency (for EnvironmentContext).
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/test/java/com/bytechef/ee/ai/copilot/agent/CopilotAgentToolContextTest.java Verifies agents publish caller identity into tool context.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/resources/prompt_workflow_editor_build.txt Updates prompt rule to allow multiple triggers.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/resources/prompt_workflow_editor_ask.txt Updates prompt rule to allow multiple triggers.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/resources/prompt_converter_build.txt Updates prompt rule to allow multiple triggers.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/resources/prompt_code_editor_build.txt Updates prompt rule to allow multiple triggers.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/resources/prompt_code_editor_ask.txt Updates prompt rule to allow multiple triggers.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/resources/prompt_cluster_element_build.txt Updates prompt rule to allow multiple triggers.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/resources/prompt_cluster_element_ask.txt Updates prompt rule to allow multiple triggers.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/config/CopilotVectorStoreLoaderConfiguration.java Makes docs indexing optional by using an optional docs-loader VectorStore bean.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/config/CopilotPgVectorConfiguration.java Adds separate vector store for docs-loader embedding provider/key (OpenAI or Ollama).
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/config/CopilotConfiguration.java Wraps all tool callbacks to rehydrate context; wires connection listers and interactive picker tools.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/agent/SkillsSpringAIAgent.java Ensures tool context includes caller identity.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/agent/ConverterSpringAIAgent.java Ensures tool context includes caller identity.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/agent/CodeEditorSpringAIAgent.java Ensures tool context includes caller identity.
server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/agent/ClusterElementSpringAIAgent.java Ensures tool context includes caller identity.
server/ee/libs/ai/ai-copilot/ai-copilot-service/build.gradle.kts Adds OpenAI okhttp client and Spring AI Ollama/OpenAI deps for docs loader embedding.
server/ee/libs/ai/ai-copilot/ai-copilot-api/src/main/java/com/bytechef/ee/ai/copilot/connection/CopilotConnectionLister.java Introduces SPI for surface-specific connection listing.
server/apps/server-app/src/main/resources/config/application-bytechef.yml Adds default Ollama embedding model configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 86 out of 89 changed files in this pull request and generated 3 comments.

Comment thread client/src/ee/pages/settings/platform/ai-providers/components/AiProviderForm.tsx Outdated
ivicac and others added 16 commits July 3, 2026 20:48
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

1570 Fix corrupted Ollama component definition snapshot

Stray character in the clusterElements separator made ollama_v1.json
unparseable, failing OllamaComponentHandlerTest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Ollama default embedding model

- RehydrateContextToolCallback.withEnvironment now saves and restores the
  thread's prior EnvironmentContext (mirroring withTenant) instead of
  unconditionally clearing it, so nested tool calls no longer drop a
  pre-existing environment binding.
- EnvironmentContext.fetchCurrentEnvironment() exposes the raw nullable
  binding to support exact save/restore.
- AiProviderFacadeImpl.resolveDefaultEmbeddingModel resolves an Ollama model
  so getAiDefaultEmbeddingModel can select OLLAMA (already in EMBEDDING_PROVIDERS).
- Fill in the empty Javadoc for Copilot docs embedding apiKey.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ivicac and others added 3 commits July 3, 2026 20:48
…empty-connection log

- OllamaChatAction: guard against a missing responseFormat when a response map
  is present, avoiding a NullPointerException.
- ListConnectionsForComponentToolCallback: log a component with no connection
  definition at DEBUG instead of WARN; it is an expected case already tracked by
  the "empty" state metric.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ding, and AWS chat memory variables

Add BYTECHEF_AI_PROVIDER_OLLAMA_{APIKEY,URL}, the Ollama embedding model, the
Copilot docs embedding provider/key, and the AWS S3 chat-memory properties.
Remove the stale BYTECHEF_AI_COPILOT_PROVIDER (property was deleted).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ivicac ivicac merged commit ff85fd9 into master Jul 3, 2026
4 checks passed
@ivicac ivicac deleted the 1570 branch July 3, 2026 18:48
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'client'

Failed conditions
36.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] AI Providers catalog: honor a custom Ollama base URL for chat and embedding models

2 participants